/**
 * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package org.opsli.modulars.business.valveStation.service.impl;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.opsli.api.wrapper.business.emergency.EmergencyReportModel;
import org.opsli.api.wrapper.business.patrolLocation.PatrolLocationModel;
import org.opsli.api.wrapper.business.patrolStation.PatrolStationModel;
import org.opsli.api.wrapper.business.valveStation.ValveStationModel;
import org.opsli.modulars.business.emergency.mapper.EmergencyReportMapper;
import org.opsli.modulars.business.patrolLocation.mapper.PatrolLocationMapper;
import org.opsli.modulars.business.patrolStation.entity.PatrolStationWeb;
import org.opsli.modulars.business.valveStation.entity.ValveStation;
import org.opsli.modulars.business.valveStation.mapper.ValveStationMapper;
import org.opsli.modulars.business.valveStation.service.IValveStationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.opsli.core.base.service.impl.CrudServiceImpl;

import org.opsli.modulars.business.patrolStation.entity.PatrolStation;
import org.opsli.modulars.business.patrolStation.service.IPatrolStationService;
import org.opsli.modulars.business.patrolStation.mapper.PatrolStationMapper;

import java.util.List;


/**
 * 巡点管理 Service Impl
 *
 * @author zk
 * @date 2021-09-14 15:53:53
 */
@Service
public class ValveStationServiceImpl extends CrudServiceImpl<ValveStationMapper, ValveStation, ValveStationModel>
    implements IValveStationService {

    @Autowired(required = false)
    private ValveStationMapper mapper;


    @Override
    public List<ValveStationModel> findList(String devid){
        return mapper.findList(devid);
    }



    @Override
    public Page<ValveStationModel> getMyList(Page<ValveStationModel> page, ValveStationModel announcementSendModel,Integer beginSize,Integer endSize){
        return page.setRecords(mapper.getMyList(announcementSendModel,beginSize,endSize));
    }

    @Override
    public List<ValveStationModel> findListByType(String devid,String type){
        return mapper.findListByType(devid, type);
    }

    @Override
    public ValveStationModel getOneValve(String valveName){
        return mapper.getOneValve(valveName);
    }

}
